﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.Eventing.Msmq
{
    [Serializable]
    public struct MsmqSubscription : IEquatable<MsmqSubscription>
    {
        public string AssemblyQualifiedType;
        public string QueueName;
        public Guid Id;


        public MsmqSubscription(Type eventType, string myQueue)
        {
            AssemblyQualifiedType = eventType.AssemblyQualifiedName;
            QueueName = myQueue;
            Id = Guid.NewGuid();
        }


        public bool Equals(MsmqSubscription other)
        {
            return Guid.Equals(this.Id, other.Id);
        }
    }
}
